package com.qyer.search.storm.util;

import java.io.Serializable;
import com.google.gson.annotations.Expose;

/**
 * Created by tangzheng on 16/5/31.
 */
public class ZTag implements Serializable {

  private int tid;
  private String tag_name;
  private int tag_type;
  private int tag_parent_type;

  public ZTag() {
  }

  public ZTag(int tid, String tag_name) {
    this.tid = tid;
    this.tag_name = tag_name;
  }

  public ZTag(int tid, String tag_name, int tag_type, int tag_parent_type) {
    this.tid = tid;
    this.tag_name = tag_name;
    this.tag_type = tag_type;
    this.tag_parent_type = tag_parent_type;
  }

  public int getTag_parent_type() {
    return tag_parent_type;
  }

  public void setTag_parent_type(int tag_parent_type) {
    this.tag_parent_type = tag_parent_type;
  }

  public int getTag_type() {
    return tag_type;
  }

  public void setTag_type(int tag_type) {
    this.tag_type = tag_type;
  }

  public String getTag_name() {
    return tag_name;
  }

  public void setTag_name(String tag_name) {
    this.tag_name = tag_name;
  }

  public int getTid() {
    return tid;
  }

  public void setTid(int tid) {
    this.tid = tid;
  }

  @Override public boolean equals(Object o) {
    if (this == o)
      return true;
    if (o == null || getClass() != o.getClass())
      return false;

    ZTag zTag = (ZTag) o;

    if (tid != zTag.tid)
      return false;
    if (tag_type != zTag.tag_type)
      return false;
    if (tag_parent_type != zTag.tag_parent_type)
      return false;
    return tag_name.equals(zTag.tag_name);

  }

  @Override public int hashCode() {
    int result = tid;
    result = 31 * result + tag_name.hashCode();
    result = 31 * result + tag_type;
    result = 31 * result + tag_parent_type;
    return result;
  }
}
